import java.net.InetAddress;
import java.net.SocketException;
import java.net.UnknownHostException;

/*
 * This class will be used as a test for the transmission of data. Send data
 * after server starts listening.
 */

public class Client {
    public static void main(String[] args) throws UnknownHostException,
            SocketException {
        byte[] mac = { -128, -128, -128, -128, -128, -128 };
        byte[] type = { -128, -128 };
        String payload = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

          RouterEngine re = new RouterEngine();
        
        // Currently the subnet and mtu are not needed for communication
        // This was a test to connect two mac's in the mac lab
        Port client = new Port((short)4005, InetAddress.getLocalHost().getHostAddress(), 30, 1500, re);
        client.connect(4006, "130.166.68.49");

        EthernetFrame message = new EthernetFrame(new MacAddress(mac),
                new MacAddress(mac), type, payload.getBytes());

        System.out.print("Outgoing Ethernet Info:\n" + message);

//        for (int i = 0; i < 10; i++){
//            client.transmit(message);
//
//        }
//        
        client.disconnect();
    }
}